FROM ecp/ubuntu:16.04-nodejs
MAINTAINER kinven xqw2@163.com

# only for Chinese Developers
#RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak
#
#COPY ./sources.list /etc/apt/
#
#RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C0B21F32 \
#  && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 437D05B5


RUN npm install doclever -g \
    && sed -i 's#input\=await#input\="/root/DOClever-Server"//#' /usr/lib/node_modules/doclever/src/doclever.js \
    && doclever --installwithoutsetup

EXPOSE 10001

COPY ./entrypoint.sh /entrypoint.sh

RUN chmod +x /entrypoint.sh 

ENTRYPOINT ["/entrypoint.sh"]
